 {
        
        var o = require("../UISoundManager.js"), i = require("../UIPopupBase.js");
        cc.Class({
            extends: i,
            properties: {
                tongGuan: {
                    default: null,
                    type: cc.Node
                },
                winNode: {
                    default: null,
                    type: cc.Node
                },
                loseNode: {
                    default: null,
                    type: cc.Node
                },
                continueQuick: {
                    default: null,
                    type: cc.Node
                },
                shareGroup: {
                    default: null,
                    type: cc.Node
                },
                quickAgain: {
                    default: null,
                    type: cc.Node
                },
                diamondRelive: {
                    default: null,
                    type: cc.Node
                },
                restartQuick: {
                    default: null,
                    type: cc.Node
                },
                _needDiamond: 0,
                _winCount: 0
            },
            init: function () {
            },
            onLoad: function () {
                Global.notificationCenter.on(Global.eventName.MSG_RESTART_QUICK, this.onStartQuick.bind(this), this),
                    Global.notificationCenter.on(Global.eventName.MSG_DIAMOND_RELIVE, this.showDiamondRelive.bind(this), this);
            },
            bindData: function (e) {
                for (var t = Global.userProfile.getUserId(), n = 0; n < e.infos.length; n++) {
                    var o = e.infos[n];
                    t == o.userId && (this._needDiamond = o.wx_h5_relive_diamond, this._winCount = o.wx_h5_win_count,
                        o.totalScore > 0 ? o.wx_h5_win_count < 2 ? (console.log("continueVictoryResult 闯关成功"),
                            this.winNode.active = !0, this.continueQuick.active = !0) : (console.log("continueVictoryResult 通关"),
                            this.tongGuan.active = !0, this.shareGroup.active = !0, this.quickAgain.active = !0) : (console.log("continueVictoryResult 闯关失败"),
                            this.loseNode.active = !0, this.diamondRelive.active = !0, Global.utils.searchComp(this.diamondRelive, "num", cc.Label).string = "x" + this._needDiamond,
                            this.restartQuick.active = !0));
                }
            },
            showDiamondRelive: function (e) {
                if (e) if (e.error) {
                    if (0 == e.error.code || 1 == e.error.code) {
                        var t = {
                            text: e.error.info,
                            confirmText: "确定",
                            confirmSp: Global.spriteAtlas.getOKSpf()
                        };
                        Global.UIPopupManager.alert(t);
                    }
                } else this.onStartQuick();
            },
            onBtnContinueQuick: function () {
                this.onStartQuick();
            },
            onBtnQuickAgain: function () {
                this.onStartQuick();
            },
            onBtnReliveByDiamond: function () {
                var e = Global.eventName.CMD_DIAMOND_RELIVE, t = this._winCount, n = this._needDiamond;
                Global.msgHandler.requestRedSuccessCount(e, t, n);
            },
            onBtnRestartQuick: function () {
                var e = Global.eventName.CMD_RESTART_QUICK;
                Global.msgHandler.requestRedSuccessCount(e);
            },
            onStartQuick: function () {
                var e = Global.config.playModel.XUELIU, t = Global.config.roomId;
                Global.msgHandler.requestQuickStart(e, t);
            },
            onBtnShare: function () {
                if (console.log("onBtnShare"), cc.sys.platform == cc.sys.WECHAT_GAME) try {
                    wx.updateShareMenu({
                        withShareTicket: !0,
                        success: function (e) {
                            console.log("share: tuyoo onQRcodeBtn success, params:" + JSON.stringify(e));
                            var t = JSON.stringify({
                                shareTongGuanToGroup: 1
                            }), n = {
                                share_type: Global.config.sharePointId.winningInvite
                            };
                            tywx.PropagateInterface.getWeightShareConfigInfoByTypeWithShare(n, t, function (e) {
                                console.log("onQRcodeBtn succCallback");
                                var t = {
                                    text: "分享成功",
                                    confirmText: "确定",
                                    confirmSp: Global.spriteAtlas.getOKSpf(),
                                    confirmCallback: function () {
                                        console.log("领取钻石..."), Global.utils_Share.getShareInfo(e.shareTickets, Global.config.rewardType.SUCC_COUNT);
                                    },
                                    needCloseBtn: !1
                                };
                                Global.UIPopupManager.alert(t);
                            });
                        }.bind(this),
                        fail: function (e) {
                            console.log("share: tuyoo onQRcodeBtn fail, params:" + JSON.stringify(e));
                        }
                    });
                } catch (e) {
                    console.log(" wx.updateShareMenu 出错了---\x3e"), console.log(e);
                }
            },
            OnPanelClose: function () {
                o.playEffect("select"), this.closePanel();
                var e = Global.tableModel.getRoomId(), t = Global.tableModel.getTableId(),
                    n = Global.tableModel.getSeatId();
                0 == e && 0 != t || Global.msgHandler.requestTableLeave(e, t, n);
                SceneHelper.loadScene("homeScene");
            }
        })
    }